sysTffs - PC Pentium/Pentium2/Pentium3 system-dependent TrueFFS library
flFitInSocketWindow( ) - check whether the flash array fits in the socket window
flDelayLoop( ) - consume the specified time
This library provides board-specific hardware access routines for TrueFFS. In effect, these routines comprise the socket component driver (or drivers) for your flash device hardware. At socket registration time, TrueFFS stores pointers to the functions of this socket component driver in an FLSocket structure. When TrueFFS needs to access the flash device, it uses these functions.
Because this file is, for the most part, a device driver that exports its functionality by registering function pointers with TrueFFS, very few of the functions defined here are externally callable. For the record, these external functions are flFitInSocketWindow( ) and flDelayLoop( ). You should never have any need to call these functions.
However, one of the most import functions defined in this file is neither referenced in an FLSocket structure, nor is it externally callable. This function is sysTffsInit( ). TrueFFS calls this function at initialization time to register socket component drivers for all the flash devices attached to your target. It is this call to sysTffs( ) that results in assigning drive numbers to the flash devices on your target hardware. Drive numbers are assigned by the order in which the socket component drivers are registered. The first to be registered is drive 0, the second is drive 1, and so on up to 4. As shipped, TrueFFS supports up to five flash drives.
After registering socket component drivers for a flash device, you may format the flash medium even though there is not yet a block device driver associated with the flash (see the reference entry for the tffsDevCreate( ) routine). To format the flash medium for use with TrueFFS, call tffsDevFormat( ) or, for some BSPs, sysTffsFormat( ).
The sysTffsFormat( ) routine is an optional but BSP-specific externally callable helper function. Internally, it calls tffsDevFormat( ) with a pointer to a FormatParams structure initialized to values that leave a space on the flash device for a boot image. This space is outside the region managed by TrueFFS. This special region is necessary for boot images because the normal translation and wear-leveling services of TrueFFS are incompatible with the needs of the boot program and the boot image it relies upon. To write a boot image (or any other data) into this area, use tffsBootImagePut( ).
flsocket.h
tffsDevFormat tffsRawio
flFitInSocketWindow( ) - check whether the flash array fits in the socket window
long int flFitInSocketWindow
(
long int chipSize, /* size of single physical chip in bytes */
int interleaving, /* flash chip interleaving (1,2,4 etc) */
long int windowSize /* socket window size in bytes */
)
This routine checks whether the flash array fits in the socket window.
A chip size guaranteed to fit in the socket window.
Not Available
flDelayLoop( ) - consume the specified time
void flDelayLoop
(
int cycles
)
This routine consumes the specified time.
N/A
Not Available